package com.zm.boss.service.service;

import com.zm.boss.service.common.enums.ErrorCodeEnum;
import com.zm.boss.service.response.Attr;
import com.zm.boss.service.response.PaginationRespTemplate;

import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.function.Supplier;

public interface BaseServiceUp<T,R>{
    Integer save(T params, ErrorCodeEnum errorCodeEnum, String... isExitsKey);

    Integer save(T params, ErrorCodeEnum errorCodeEnum, String key, List<String> encryptionKey, String... isExitsKey);

    public List<R> query(T params);


    Integer update(T params);

    Integer save(T params);

    Integer delete(T params);

    Integer count(T params);

    R findById(T params);

    Map<String, Object> initParams(T params);

    PaginationRespTemplate<R> queryPage(T params, PaginationRespTemplate<R> paginationRespTemplate, String title, Supplier<Object[]> supplier, Function<Object, List<Attr>> attr);
}
